app.controller('ViewCtrl',['$scope','RecipeLoader','$stateParams','$location',function($scope,RecipeLoader,$stateParams,$location){
    console.log($stateParams);
    RecipeLoader().then(function(data){
        $scope.data=data;
    });
    $scope.edit=function(){
        $location.path('/edit/'+$stateParams.id);
    }
}]);